@extends('admin')
@section('content')
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/member')}}" method="get" class="search_form">
            <label for="search_name">账号：</label><input type="text" name="name" value="{{$name}}" id="search_name" class="input length_2"/>
            <button type="submit" class="btn">提交查询</button>
        </form>
    </div>
    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>姓名</th>
                    <th>会员类别</th>
                    <th>有效时间</th>
                    <th>注册时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $item)
                    <tr>
                        <td>{{$item->id}}</td>
                        <td>{{$item->name}}</td>
                        <td>{{$typeList[$item->type]}}</td>
                        <td>{{date('Y-m-d', strtotime($item->deadline))}}</td>
                        <td>{{$item->created_at}}</td>
                        <td>
                            <a href="{{url('admin/member/update/'.$item->id)}}" title="{{$item->name}}的资料" class="mr10 J_dialog">[编辑]</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$list->total()}} 条数据
        </div>
        @if ($list->hasPages())
            <div class="pager">
                <!--
                <span style="float:left; margin-right:10px;">
                    转至<input type="text" id="goToPage" class="input" style="width:30px; text-align:center;">页
                    <span onclick="goto();" class="btn btn_submit">跳转</span>
                </span>
                -->
                {!! $list->appends($appends)->render() !!}
            </div>
        @endif
    </div>

@stop